package router

import (
	"design-hub/handler"
	"github.com/gin-gonic/gin"
	"net/http"
)

func Routers() *gin.Engine {
	// 1.创建路由
	r := gin.Default()

	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})
	r.POST("/list", handler.Good)
	r.GET("/good", handler.List)
	r.GET("/like", handler.Create)
	return r

}
